package com.luo.ai.assistant.file.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.luo.ai.assistant.file.model.FilePartDetail;

/**
 * 文件分片上传记录DAO
 *
 * @author luohq
 * @date 2025-01-07
 */
public interface FilePartDetailMapper extends MyBaseMapper<FilePartDetail> {

    /**
     * 根据上传ID删除文件分片上传记录
     *
     * @param uploadId 上传ID
     * @return 删除记录数
     */
    default Integer deleteByUploadId(String uploadId) {
        return this.delete(new QueryWrapper<FilePartDetail>().eq(FilePartDetail.COL_UPLOAD_ID, uploadId));
    }
}
